package com.bang.study.filter;

import java.util.ArrayList;
import java.util.List;

/**
 * @ClassName: CriteriaMale
 * @author: BANG
 * @Date: 2019/10/28 19:21
 * @Version: 1.0
 * @Modified By:
 * @Desc: TODO
 */
public class CriteriaFemale implements Criteria {
    @Override
    public List<Person> meetCriteria(List<Person> persons) {
        List<Person> femalePersons = new ArrayList<Person>();
        for (Person person : persons) {
            if(person.getGender().equalsIgnoreCase("FEMALE")){
                femalePersons.add(person);
            }
        }
        return femalePersons;
    }
}
